<script lang="ts" setup>
import { ref } from 'vue'
import XConfigProvider from './configProvider/src/configProvider'
import XNbutton from './button/src/button'

const theme = ref('light')
const loading = ref(false)
const update = () => {
  theme.value = 'dark'
}
const updateLoding = () => {
  loading.value = true
  setTimeout(() => (loading.value = false), 4000)
}
</script>

<template>
  <div>
    <XConfigProvider :theme="theme">
      <XNbutton
        @click="updateLoding"
        size="big"
        icon="AccessibilityOutline"
        :loading="loading"
        :disabled="false"
        rounded
        type="success"
      >
        你吃饭了吗
      </XNbutton>
    </XConfigProvider>

    <button @click="update">变深色</button>
  </div>
</template>

<style></style>
